package com.tyqx.hashchainbackend;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import redis.clients.jedis.JedisPool;

@ComponentScan(basePackages = {"com.tyqx.hashchainutil.*","com.tyqx.hashchainbackend.*","hashchainutil.*"})
@ServletComponentScan
@MapperScan({"com.tyqx.hashchaindao.mapper"})
@EnableTransactionManagement
@Import({
        JedisPool.class
})
@EnableMongoRepositories
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class},scanBasePackages = "com.tyqx.hashchainbackend.controller")
public class HashchainBackendApplication {

    public static void main(String[] args) {
        SpringApplication.run(HashchainBackendApplication.class, args);
    }

}
